﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="AgentUserList.aspx.cs" Inherits="IHISCETeim.Web.AgentSys.SysMgr.AgentUserList" %>
<!DOCTYPE html>
<html>
<head runat="server">
    <title>经销商用户管理</title>
</head>
<body>
    <form id="form1" runat="server">
        <f:PageManager ID="PageManager1" AutoSizePanelID="Panel1" runat="server" />
        <f:Panel ID="Panel1" runat="server" BodyPadding="2px"  
            ShowBorder="false" Layout="VBox" BoxConfigAlign="Stretch" BoxConfigPosition="Start"
            ShowHeader="false" Title="经销商用户管理">
            <Items>
                <f:Form ID="Form2" runat="server" Height="36px" BodyPadding="2px 1px" ShowHeader="false"
                    ShowBorder="false" LabelAlign="Right" >
                    <Rows>
                        <f:FormRow ID="FormRow1" runat="server">
                            <Items>
                                <f:TwinTriggerBox ID="ttbSearchMessage" runat="server" ShowLabel="false" EmptyText="在经销商名称中搜索"
                                    Trigger1Icon="Clear" Trigger2Icon="Search" ShowTrigger1="false" OnTrigger2Click="ttbSearchMessage_Trigger2Click"
                                    OnTrigger1Click="ttbSearchMessage_Trigger1Click">
                                </f:TwinTriggerBox>
                               <%-- <f:RadioButtonList ID="rblEnableStatus" AutoPostBack="true" OnSelectedIndexChanged="rblEnableStatus_SelectedIndexChanged"
                                    Label="启用状态" ColumnNumber="3" runat="server">
                                    <f:RadioItem Text="全部" Selected="true" Value="all" />
                                    <f:RadioItem Text="启用" Value="enabled" />
                                    <f:RadioItem Text="禁用" Value="disabled" />
                                </f:RadioButtonList>--%>
                                <f:DropDownList ID="ddlRoleId" runat="server" Label="所属角色:" DataValueField="RoleId" DataTextField="RoleName" OnSelectedIndexChanged="ddlRoleId_SelectedIndexChanged" AutoPostBack="true" >

                                </f:DropDownList>
                            </Items>
                        </f:FormRow>
                    </Rows>
                </f:Form>
                <f:Grid ID="Grid1" runat="server" BoxFlex="1" ShowBorder="true" ShowHeader="false"
                    EnableCheckBoxSelect="true"  EnableColumnLines="true" 
                    DataKeyNames="UserId" AllowSorting="true" OnSort="Grid1_Sort"  SortField="UserID"
                    SortDirection="DESC" AllowPaging="true" IsDatabasePaging="true" OnPreDataBound="Grid1_PreDataBound"
                    OnPreRowDataBound="Grid1_PreRowDataBound"
                    OnRowCommand="Grid1_RowCommand" OnPageIndexChange="Grid1_PageIndexChange" OnRowDataBound="Grid1_RowDataBound">
                    <Toolbars>
                        <f:Toolbar ID="Toolbar1" runat="server">
                            <Items>
                                <f:Button ID="btnNew" runat="server" Icon="Add" EnablePostBack="false" Text="新增用户"></f:Button>
                                <f:ToolbarFill ID="ToolbarFill1" runat="server"></f:ToolbarFill>
                                <f:Button ID="btnDeleteSelected" Icon="Delete" runat="server" Text="删除选中记录" OnClick="btnDeleteSelected_Click" ></f:Button>
                                <f:ToolbarSeparator runat="server"></f:ToolbarSeparator>
                                <f:Button ID="btnChangeEnableUsers" Icon="GroupEdit" EnablePostBack="false" runat="server"
                                    Text="设置启用状态">
                                    <Menu runat="server">
                                        <f:MenuButton ID="btnEnableUsers" OnClick="btnEnableUsers_Click" runat="server" Text="启用选中记录">
                                        </f:MenuButton>
                                        <f:MenuButton ID="btnDisableUsers" OnClick="btnDisableUsers_Click" runat="server"
                                            Text="禁用选中记录">
                                        </f:MenuButton>
                                    </Menu>
                                </f:Button>
                            </Items>
                        </f:Toolbar>
                    </Toolbars>
                    <PageItems>
                        <f:ToolbarSeparator ID="ToolbarSeparator1" runat="server">
                        </f:ToolbarSeparator>
                        <f:ToolbarText ID="ToolbarText1" runat="server" Text="每页记录数：">
                        </f:ToolbarText>
                        <f:DropDownList ID="ddlGridPageSize" Width="80px" AutoPostBack="true" OnSelectedIndexChanged="ddlGridPageSize_SelectedIndexChanged"
                            runat="server">
                            <f:ListItem Text="10" Value="10" />
                            <f:ListItem Text="20" Value="20" />
                            <f:ListItem Text="50" Value="50" />
                            <f:ListItem Text="100" Value="100" />
                        </f:DropDownList>
                    </PageItems>
                    <Columns>
                        <f:RowNumberField Width="35px" EnablePagingNumber="true" />
                         <f:TemplateField HeaderText="服务担当"  Width="100px" >
                            <ItemTemplate>
                                <asp:Label runat="server" ID="SrvActUserName" ></asp:Label>
                            </ItemTemplate>
                        </f:TemplateField>
                        <f:BoundField DataField="RealName" SortField="RealName"  HeaderText="经销商"  Width="120px"/> 
                        <f:BoundField DataField="RoleName" SortField="RoleName"  HeaderText="所属角色"  Width="120px"/>                          
                        <f:BoundField DataField="UserName" SortField="UserName" Width="100px" HeaderText="登陆名" /> 
                        <f:BoundField DataField="Email" SortField="Email" Width="150px" HeaderText="内勤邮箱" />
                        <f:CheckBoxField DataField="State" SortField="State" HeaderText="启用" RenderAsStaticField="true" Width="50px" /> 
                        <f:BoundField DataField="CreateDate" SortField="CreateDate" DataFormatString="{0:yyyy-MM-dd}" HeaderText="创建时间" NullDisplayText="" Width="100px" />  
                        <f:BoundField DataField="LoginCount"  SortField="LoginCount" HeaderText="登陆次数" NullDisplayText="0" Width="90px" />      
                        <f:BoundField DataField="LastLogin"  SortField="LastLogin" HeaderText="上次使用" DataFormatString="{0:yyyy-MM-dd}" NullDisplayText="" Width="100px" />                                          
                        <%--<f:WindowField TextAlign="Center" Icon="Information" ToolTip="查看详细信息" Title="查看详细信息"
                            WindowID="Window1" DataIFrameUrlFields="UserId" DataIFrameUrlFormatString="AgentUserEdit.aspx?userid={0}"
                            Width="50px" HeaderText="查看" />--%>
                        <f:WindowField ColumnID="changePasswordField" TextAlign="Center" Icon="Key" ToolTip="修改密码"
                            WindowID="Window1" Title="修改密码" DataIFrameUrlFields="UserId" DataIFrameUrlFormatString="AgentUserEdit.aspx?userid={0}"
                            Width="80px" HeaderText="改密码"/>
                        <f:WindowField ColumnID="editField" TextAlign="Center" Icon="Pencil" ToolTip="编辑"
                            WindowID="Window1" Title="编辑" DataIFrameUrlFields="UserId" DataIFrameUrlFormatString="AgentUserEdit.aspx?userid={0}"
                            Width="50px"  HeaderText="修改"/>
                        <f:LinkButtonField ColumnID="deleteField" TextAlign="Center" Icon="Delete" ToolTip="删除"
                            ConfirmText="确定删除此记录？删除后与此经销商关联的数据以后将不能使用．" ConfirmTarget="Self" CommandName="Delete" Width="50px" HeaderText="删除"/>
                    </Columns>
                </f:Grid>
            </Items>
        </f:Panel>
        <f:Window ID="Window1" runat="server" IsModal="true" Hidden="true" Target="Self" EnableConfirmOnClose="true" EnableResize="true"
            EnableMaximize="true" EnableIFrame="true" IFrameUrl="about:blank" Width="650px"
            Height="450px" OnClose="Window1_Close">
        </f:Window>
    </form>
</body>
</html>
